class Point{
    constructor(x, y) {
        this.x = x;
        this.y = y;
    }
    distance(p) {
        let dx = p.x - this.x;
        let dy = p.y - this.y;
        return Math.sqrt(dx * dx + dy * dy);
    }
}


export { Point };